package com.jellyfishumbrella.GL;

import org.lwjgl.util.vector.Vector3f;

import quickhull3d.Vector3d;

public class Normal extends Vector3d {

	public Normal() {

	}

	public Normal(double x, double y, double z) {
		super(x, y, z);
	}

	public Vector3f glCoords() {
		return new Vector3f((float) x, (float) y, (float) z);
	}

	public String toString() {
		String str = "";
		str = glCoords().toString();
		return str;
	}

	public void normalize() {
		double mag = Math.sqrt(x * x + y * y + z * z);
		if (mag != 0) {
			x /= mag;
			y /= mag;
			z /= mag;
		}
	}
}
